Reverting new Special:SpecialPages layout: Problems in RTL wikis in Firefox (didn...
authorRotem Liss <rotem@users.mediawiki.org>
Tue, 3 Jun 2008 12:56:33 +0000 (12:56 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Tue, 3 Jun 2008 12:56:33 +0000 (12:56 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/SpecialSpecialpages.php
skins/common/common_rtl.css
skins/common/shared.css
skins/modern/rtl.css
skins/monobook/rtl.css

index e30fa58..3be863a 100644 (file)
@@ -129,8 +129,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Add information about user group membership to Special:Preferences
 * (bug 14146) Wrap usage section on imagepages into <div>s.
 * New layout for Special:Specialpages. Restricted pages are marked but not separated
-  from other pages in their group. And the page uses css rather than tables to create
-  a column layout which grades well in all sizes of browsers.
+  from other pages in their group.
 * (bug 14263) Show a diff of the revert on rollback notification page.
 * (bug 13434) Show a warning when hash identical files exist
 
index 5f60a08..28e9de0 100644 (file)
@@ -1324,7 +1324,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '151';
+$wgStyleVersion = '152';
 
 
 # Server-side caching:
index 3179577..eb03710 100644 (file)
@@ -16,12 +16,12 @@ function wfSpecialSpecialpages() {
        $sk = $wgUser->getSkin();
 
        $pages = SpecialPage::getUsablePages();
-       
+
        if( count( $pages ) == 0 ) {
                # Yeah, that was pointless. Thanks for coming.
                return;
        }
-       
+
        /** Put them into a sortable array */
        $groups = array();
        foreach ( $pages as $page ) {
@@ -30,45 +30,55 @@ function wfSpecialSpecialpages() {
                        if( !isset($groups[$group]) ) {
                                $groups[$group] = array();
                        }
+                       //$groups[$group][$page->getDescription()] = $page->getTitle();
                        $groups[$group][$page->getDescription()] = array( $page->getTitle(), $page->isRestricted() );
                }
        }
-       
+
        /** Sort */
        if ( $wgSortSpecialPages ) {
                foreach( $groups as $group => $sortedPages ) {
                        ksort( $groups[$group] );
                }
        }
-       
+
        /** Always move "other" to end */
        if( array_key_exists('other',$groups) ) {
                $other = $groups['other'];
                unset( $groups['other'] );
                $groups['other'] = $other;
        }
-       
+
        /** Now output the HTML */
        $restrictedPages = false;
        foreach ( $groups as $group => $sortedPages ) {
+               $middle = ceil( count($sortedPages)/2 );
+               $total = count($sortedPages);
+               $count = 0;
+
                $wgOut->addHTML( "<h4 class='mw-specialpagesgroup'>".wfMsgHtml("specialpages-group-$group")."</h4>\n" );
-               $wgOut->addHTML( "<ul class='mw-specialpages-section'>" );
-               foreach ( $sortedPages as $desc => $specialpage ) {
+               $wgOut->addHTML( "<table style='width: 100%;' class='mw-specialpages-table'><tr>" );
+               $wgOut->addHTML( "<td width='30%' valign='top'><ul>\n" );
+               foreach( $sortedPages as $desc => $specialpage ) {
                        list( $title, $restricted ) = $specialpage;
                        $link = $sk->makeKnownLinkObj( $title , htmlspecialchars( $desc ) );
                        if( $restricted ) {
                                $wgOut->addHTML( "<li class='mw-specialpages-page mw-specialpagerestricted'>{$link}</li>\n" );
-                               $restrictedPages = true;
                        } else {
-                               $wgOut->addHTML( "<li class='mw-specialpages-page'>{$link}</li>\n" );
+                               $wgOut->addHTML( "<li>{$link}</li>\n" );
+                       }
+
+                       # Split up the larger groups
+                       $count++;
+                       if( $total > 3 && $count == $middle ) {
+                               $wgOut->addHTML( "</ul></td><td width='10%'></td><td width='30%' valign='top'><ul>" );
                        }
                }
-               $wgOut->addHTML( "</ul>\n" );
+               $wgOut->addHTML( "</ul></td><td width='30%' valign='top'></td></tr></table>\n" );
        }
        $wgOut->addHTML(
                Xml::openElement('div', array( 'class' => 'mw-specialpages-notes' )).
                wfMsgWikiHtml('specialpages-note').
                Xml::closeElement('div')
        );
-       
 }
\ No newline at end of file
index 8f11b11..d662962 100644 (file)
@@ -48,8 +48,3 @@ html > body div#article ul {
 html > body div#article ol {
        display: table;
 }
-
-/* Special:SpecialPages styling */
-.mw-specialpages-page {
-       float: right;
-}
index 318a88e..5eaa989 100644 (file)
@@ -236,30 +236,15 @@ table.mw-listgrouprights-table td, table.mw-listgrouprights-table th {
 
 /* Special:SpecialPages styling */
 h4.mw-specialpagesgroup {
-       padding: 2px;
        background-color: #dcdcdc;
-       margin: .3em 0em 0em;
-       clear: both;
-}
-.mw-specialpages-section {
-       display: block;
-       width: 100%;
-       clear: both;
-}
-.mw-specialpages-page {
-       float: left;
-       width: 275px;
-       margin: 0em .3em .3em;
+       padding: 2px;
+       margin: .3em 0em 0em 0em;
 }
 .mw-specialpagerestricted {
        display: list-item;
        list-style-image: url(images/bullet_star.gif);
 }
 
-.mw-specialpages-notes {
-       clear: both;
-}
-
 #shared-image-dup, #shared-image-conflict {
        font-style: italic;
 }
index 0e59517..e286a3f 100644 (file)
@@ -156,8 +156,3 @@ html > body div#mw_contentholder ol {
 html > body div#mw_contentholder ul#filetoc {
        display: block;
 }
-
-/* Special:SpecialPages styling */
-.mw-specialpages-page {
-       float: right;
-}
index cd81ac1..73bc145 100644 (file)
@@ -242,8 +242,3 @@ html > body div#bodyContent ol {
 html > body div#bodyContent ul#filetoc {
        display: block;
 }
-
-/* Special:SpecialPages styling */
-.mw-specialpages-page {
-       float: right;
-}